﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainSite.Master" AutoEventWireup="true" CodeBehind="Redigera.aspx.cs" Inherits="TandvardsstodApp.Bedomningar.Redigera" %>
<asp:Content ID="Content1" ContentPlaceHolderID="title" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<%-- Skapad och bearbetad av Ali Agha --%>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Italic="True" 
        Text="Redigera förhandbedömning"></asp:Label>
    <br />
    <br />
    <br />

    <asp:Label ID="lblSok" runat="server" Font-Bold="True" 
        Text="Sök i förhandsbedömning:"></asp:Label>
&nbsp;&nbsp;<asp:TextBox ID="txtSokF" runat="server"></asp:TextBox>
     
    <asp:Button ID="BtnSokF" runat="server" onclick="BtnSokF_Click" Text="Sök" CausesValidation="false"/>
    <asp:Label ID="lblResultat" runat="server" Font-Bold="True"></asp:Label>
     
    <br />
     
    <br />
     
    <asp:Table ID="Table1" runat="server" Width="444px">
            <asp:TableRow ID="TableRow2" runat="server">
                <asp:TableCell ID="TableCell3" runat="server"><asp:Label ID="lblLopNr" runat="server" Text="Löpnummer: "></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell4" runat="server"><asp:TextBox ID="txtLopNr" runat="server"></asp:TextBox></asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow3" runat="server">
                <asp:TableCell ID="TableCell5" runat="server"><asp:Label ID="lblAnkomst" runat="server" Text="Ankomstdatum: "></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell6" runat="server"><asp:TextBox ID="txtAnkomst" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvAnkomst" runat="server" ControlToValidate="txtAnkomst" 
                    ErrorMessage="Fel inmatning av datum.">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revAnkomst" runat="server" ForeColor="Red" ControlToValidate="txtAnkomst" meta:resourcekey="revAnkomst" 
                    ValidationExpression="[0-9]{4}[-][0-9]{2}[-][0-9]{2}">YYYY-MM-DD</asp:RegularExpressionValidator>
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow4" runat="server">
                <asp:TableCell ID="TableCell7" runat="server"><asp:Label ID="lblPersonnr" runat="server" Text="Personnummer:"></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell8" runat="server"><asp:TextBox ID="txtPersonnr" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvPersonnummer" runat="server" ControlToValidate="txtPersonnr" 
                    ErrorMessage="Personnummer krävs.">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revPersonnummer" runat="server" ForeColor="Red" ControlToValidate="txtPersonnr" meta:resourcekey="revPersonnummer" 
                    ValidationExpression="[0-9]{6}[-][0-9]{4}">ÅÅMMDD-0000</asp:RegularExpressionValidator>
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow6" runat="server">
                <asp:TableCell ID="TableCell11" runat="server"><asp:Label ID="lblBedömläkare" runat="server" Text="Bedömningstandläkare/BTL: "></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell12" runat="server"><asp:TextBox ID="txtBedömläkare" runat="server"></asp:TextBox></asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow7" runat="server">
                <asp:TableCell ID="TableCell13" runat="server"><asp:Label ID="lblSandBTL" runat="server" Text="Sänd till BTL: "></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell14" runat="server"><asp:TextBox ID="txtSandBTL" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvSandBTL" runat="server" ControlToValidate="txtSandBTL" 
                    ErrorMessage="Fel inmatning av datum.">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revSandBTL" runat="server" ForeColor="Red" ControlToValidate="txtSandBTL" meta:resourcekey="revSandBTL" 
                    ValidationExpression="[0-9]{4}[-][0-9]{2}[-][0-9]{2}">YYYY-MM-DD</asp:RegularExpressionValidator>
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow8" runat="server">
                <asp:TableCell ID="TableCell15" runat="server"><asp:Label ID="lblAterBTL" runat="server" Text="Åter från BTL: "></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell16" runat="server"><asp:TextBox ID="txtAterBTL" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvAterBTL" runat="server" ControlToValidate="txtAterBTL" 
                    ErrorMessage="Fel inmatning av datum.">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revAterBTL" runat="server" ForeColor="Red" ControlToValidate="txtAterBTL" meta:resourcekey="revAterBTL" 
                    ValidationExpression="[0-9]{4}[-][0-9]{2}[-][0-9]{2}">YYYY-MM-DD</asp:RegularExpressionValidator>
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow9" runat="server">
                <asp:TableCell ID="TableCell17" runat="server"><asp:Label ID="lblBeslutdatum" runat="server" Text="Beslutsdatum: "></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell18" runat="server"><asp:TextBox ID="txtBeslutdatum" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvBeslutDatum" runat="server" ControlToValidate="txtBeslutdatum" 
                    ErrorMessage="Fel inmatning av datum.">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revBeslutdatum" runat="server" ForeColor="Red" ControlToValidate="txtBeslutdatum" meta:resourcekey="revBeslutdatum" 
                    ValidationExpression="[0-9]{4}[-][0-9]{2}[-][0-9]{2}">YYYY-MM-DD</asp:RegularExpressionValidator>
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow10" runat="server">
                <asp:TableCell ID="TableCell19" runat="server"><asp:Label ID="lblBeslutAv" runat="server" Text="Beslut av: "></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell20" runat="server"><asp:TextBox ID="txtBeslutAv" runat="server"></asp:TextBox></asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow11" runat="server">
                <asp:TableCell ID="TableCell21" runat="server"><asp:Label ID="lblAterTillTandlakare" runat="server" Text="Åter till tandläkare: "></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell22" runat="server"><asp:TextBox ID="txtAterTillTandlakare" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvAterTillTandlakare" runat="server" ControlToValidate="txtAterTillTandlakare" 
                    ErrorMessage="Fel inmatning av datum.">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revAterTillTandlakare" runat="server" ForeColor="Red" ControlToValidate="txtAterTillTandlakare" meta:resourcekey="revAterTillTandlakare" 
                    ValidationExpression="[0-9]{4}[-][0-9]{2}[-][0-9]{2}">YYYY-MM-DD</asp:RegularExpressionValidator>
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow12" runat="server">
                <asp:TableCell ID="TableCell23" runat="server"><asp:Label ID="lblKostnad" runat="server" Text="Beräknad kostnad: "></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell24" runat="server"><asp:TextBox ID="txtKostnad" runat="server"></asp:TextBox></asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow1" runat="server">
                <asp:TableCell ID="TableCell1" runat="server"><asp:Label ID="lblBehKod" runat="server" Text="Behandlarkod: "></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell2" runat="server">
                <asp:DropDownList ID="DdlBehKod" runat="server">
                    <asp:ListItem>Ingen behandlare</asp:ListItem>
                </asp:DropDownList>
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow13" runat="server">
                <asp:TableCell ID="TableCell25" runat="server"><asp:Label ID="lblKlinik" runat="server" Text="Klinik: "></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell26" runat="server">
                <asp:DropDownList ID="DdlKlinik" runat="server">
                    <asp:ListItem>Ingen klinik</asp:ListItem>
                </asp:DropDownList>
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow14" runat="server">
                <asp:TableCell ID="TableCell27" runat="server"><asp:Label ID="LblGrupp" runat="server" Text="Grupp:"></asp:Label></asp:TableCell>
                <asp:TableCell ID="TableCell28" runat="server">        
                    <asp:DropDownList ID="DdlGrupp" runat="server">
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                    <asp:ListItem>3</asp:ListItem>
                    <asp:ListItem>4</asp:ListItem>
                    <asp:ListItem>5</asp:ListItem>
                </asp:DropDownList></asp:TableCell>
            </asp:TableRow>
        </asp:Table>

        <asp:CheckBox ID="chkNodTandvard" runat="server" Text="Nödvändig tandvård" />
        <br />
        <asp:CheckBox ID="chkProtetik" runat="server" Text="Protetik" />
        <br />
        <asp:CheckBox ID="chkMerAn4000Kr" runat="server" Text="Mer än 4000 kronor" />
        <br />
        <asp:CheckBox ID="chkTSLIES" runat="server" Text="Tandvård som led i en sjukdomsbehandling" />
        <br />
        <asp:CheckBox ID="chkGodkand" runat="server" Text="Godkänd" />
        <br />
        <asp:CheckBox ID="chkGodKandForandring" runat="server" Text="GodKänd med förändring" />
        <br />
        <asp:CheckBox ID="chkEjGodkand" runat="server" Text="Ej godkänd" />
        <br />
        <asp:CheckBox ID="chkMakulerad" runat="server" Text="Makulerad" />
        <br />
        <asp:CheckBox ID="chkTandvardsintygFinns" runat="server" Text="Tandvårdsintyg finns" />
        <br />
        <asp:CheckBox ID="chkSarskildAtgard" runat="server" Text="Särskild åtgärd" />
        <br />
        <asp:Label ID="LblKommentar" runat="server" Text="Kommentar:"></asp:Label>
        <br />
        <asp:TextBox ID="TxtKommentar" runat="server" Height="68px" TextMode="MultiLine" 
            Width="278px"></asp:TextBox>
        <br />
        <br />



    <asp:Button ID="sparaForhand" runat="server" Text="Spara" 
        onclick="sparaForhand_Click" />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="GetDataByLöpnr" 
        TypeName="TandvardsstodApp.ServiceReference1.Service1Client" 
        UpdateMethod="UpdateFörhands2">
        <SelectParameters>
            <asp:ControlParameter ControlID="txtSokF" DefaultValue="2" Name="Löpnummer" 
                PropertyName="Text" Type="String" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="löpnummer" Type="String" />
            <asp:Parameter Name="ankomstDatum" Type="String" />
            <asp:Parameter Name="personnummer" Type="String" />
            <asp:Parameter Name="behandlarKod" Type="String" />
            <asp:Parameter Name="bedömningstandläkare" Type="String" />
            <asp:Parameter Name="sändTillBTL" Type="String" />
            <asp:Parameter Name="återFrånBTL" Type="String" />
            <asp:Parameter Name="beslutsDatum" Type="String" />
            <asp:Parameter Name="beslutAv" Type="String" />
            <asp:Parameter Name="återTillTandläkare" Type="String" />
            <asp:Parameter Name="nödvändigTandvård" Type="Boolean" />
            <asp:Parameter Name="protetik" Type="Boolean" />
            <asp:Parameter Name="merÄn4000" Type="Boolean" />
            <asp:Parameter Name="ledISjukbehandling" Type="Boolean" />
            <asp:Parameter Name="grupp" Type="Int32" />
            <asp:Parameter Name="beräknadKostnad" Type="Decimal" />
            <asp:Parameter Name="godkänd" Type="Boolean" />
            <asp:Parameter Name="godkändMedFörändring" Type="Boolean" />
            <asp:Parameter Name="ejGodkänd" Type="Boolean" />
            <asp:Parameter Name="makulerad" Type="Boolean" />
            <asp:Parameter Name="klinik" Type="String" />
            <asp:Parameter Name="kommentar" Type="String" />
            <asp:Parameter Name="tandvårdsintygFinns" Type="Boolean" />
            <asp:Parameter Name="särskildÅtgärd" Type="Boolean" />
            <asp:Parameter Name="id" Type="Int32" />
        </UpdateParameters>
    </asp:ObjectDataSource>




&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 




</asp:Content>